home *** CD-ROM | disk | FTP | other *** search
- import java.io.DataInputStream;
- import java.io.InputStream;
-
- class Stm {
- private JglFrame resource;
- private int nOffsetChar;
- private int nOffsetHit;
- private int nOffsetEvent;
- private StmIndex siChar;
- private StmIndex siHit;
- private StmIndex siEvent;
-
- public Stm(JglFrame var1) {
- this.resource = var1;
- this.siChar = new StmIndex();
- this.siHit = new StmIndex();
- this.siEvent = new StmIndex();
- }
-
- public boolean read(String var1) {
- try {
- InputStream var2 = this.resource.openStream(var1);
- this.readHeader(var2);
- this.siChar.read(var2);
- this.siHit.read(var2);
- this.siEvent.read(var2);
- var2.close();
- return true;
- } catch (Exception var3) {
- System.out.println("read Err");
- return true;
- }
- }
-
- public boolean readHeader(InputStream var1) {
- try {
- DataInputStream var2 = new DataInputStream(var1);
- var2.skipBytes(4);
- this.nOffsetChar = var2.readInt();
- this.nOffsetHit = var2.readInt();
- this.nOffsetEvent = var2.readInt();
- return true;
- } catch (Exception var3) {
- return false;
- }
- }
-
- public StmIndex getChar() {
- return this.siChar;
- }
-
- public StmIndex getHit() {
- return this.siHit;
- }
-
- public StmIndex getEvent() {
- return this.siEvent;
- }
- }
-